import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
import '@/common/config/uview-reset.js'

import './uni.promisify.adaptor';
import store from '@/store';

import request from '@/common/request/request.js';
import utils from '@/common/utils/utils.js';
import auth from '@/common/utils/auth.js';
import router from '@/common/utils/router.js';
import dialog from '@/common/utils/dialog.js';
import config from '@/common/config/config.js';
import {
	interceptor
} from '@/store/permission.js'

interceptor()

if (process.env.NODE_ENV === 'production') {
	console.log = () => {

	}
}






Vue.prototype.$utils = utils;
Vue.prototype.$auth = auth;
Vue.prototype.$CGRouter = router;
Vue.prototype.$dialog = dialog;
Vue.prototype.$config = config;
Vue.prototype.$getConfig = new Promise(resolve => {
	Vue.prototype.$isResolve = resolve
})
let vuexStore = require("@/store/$u.mixin.js");
Vue.mixin(vuexStore);


Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
request(app)
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif